Ext.onReady(function() {

	var reader = new Ext.ux.grid.livegrid.JsonReader({
				root	: 'data'
			}, ['id', 'loginId', 'loginTime', 'ip']);

	var store = new Ext.ux.grid.livegrid.Store({
				proxy		: new Ext.data.HttpProxy({
							url		: 'huge.json',
							method	: 'GET'
						}),
				autoLoad	: true,
				bufferSize	: 300,
				reader		: reader
			});
	var view = new Ext.ux.grid.livegrid.GridView({
				forceFit	: true,
				nearLimit	: 100,
				loadMask	: {
					msg	: 'Please wait...'
				}
			});
	var bbar = new Ext.ux.grid.livegrid.Toolbar({
				view		: view,
				displayInfo	: true
			});

	var cm = new Ext.grid.ColumnModel([new Ext.grid.CheckboxSelectionModel(),
			new Ext.grid.RowNumberer({
						header	: '序号',
						width	: 35
					}), {
				header		: "登录者",
				dataIndex	: 'loginId'
			}, {
				header		: '登录时间',
				dataIndex	: 'loginTime'
			}, {
				header		: 'IP',
				dataIndex	: 'ip'
			}]);

	var grid = new Ext.ux.grid.livegrid.GridPanel({
				title		: 'LiveGrid Demo',
				height		: 600,
				width		: 600,
				frame		: true,
				cm			: cm,
				sm			: new Ext.ux.grid.livegrid.RowSelectionModel(),
				store		: store,
				bbar		: bbar,
				view		: view,
				loadMask	: {
					msg	: 'Loading...'
				}
			});

	new Ext.Viewport({
				layout	: 'fit',
				items	: grid
			});

	grid.on('cellclick', function(_grid, _rowIdx, _colIdx) {
				alert(_rowIdx + " " + _colIdx);
			});

		/*var cb = new Ext.form.ComboBox({
	renderTo		: Ext.getBody(),
	fieldLabel		: 'Combobox field label',
	width			: 186,
	typeAhead		: true,
	displayField	: 'value',
	mode			: 'local',
	value			: new Date().format('Y'),
	triggerAction	: 'all',
	hideOnSelect	: false,
	emptyText		: 'Select year...',
	store			: (function() {
	var years = [];
	var dt = new Date();
	for (var i = 1900; i <= dt.format('Y'); i++) {
	years.push(i);
	}
	return years;
	}).createDelegate(this)()
	});
	*/
	}
);